home *** CD-ROM | disk | FTP | other *** search
/ Clickx 23 / Clickx 23.iso / DATA / wordpress / wp-admin / options-writing.php < prev    next >
Encoding:
PHP Script  |  2005-03-22  |  6.1 KB  |  112 lines

  1. <?php
  2. require_once('admin.php');
  3.  
  4. $title = __('Writing Options');
  5. $parent_file = 'options-general.php';
  6.  
  7. include('admin-header.php');
  8. ?>
  9.  
  10. <div class="wrap"> 
  11.   <h2><?php _e('Writing Options') ?></h2> 
  12.   <form name="form1" method="post" action="options.php"> 
  13.     <input type="hidden" name="action" value="update" /> 
  14.     <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','use_balanceTags','advanced_edit','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category','default_email_category','new_users_can_blog'" /> 
  15.     <table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
  16.       <tr valign="top">
  17.         <th scope="row"> <?php _e('When starting a post, show:') ?> </th>
  18.         <td><?php get_settings('advanced_edit') ?><label>
  19.           <input name="advanced_edit" type="radio" value="0" <?php checked('0', get_settings('advanced_edit')); ?> />
  20. <?php _e('Simple controls') ?></label>
  21.           <br />
  22.           <label for="advanced_edit">
  23.           <input name="advanced_edit" id="advanced_edit" type="radio" value="1" <?php checked('1', get_settings('advanced_edit')); ?> />
  24. <?php _e('Advanced controls') ?></label>
  25.         </td>
  26.       </tr>
  27.       <tr valign="top"> 
  28.         <th width="33%" scope="row"> <?php _e('Size of the writing box:') ?></th> 
  29.         <td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " /> 
  30.          <?php _e('lines') ?></td> 
  31.       </tr> 
  32.       <tr valign="top">
  33.         <th scope="row"><?php _e('Formatting:') ?></th>
  34.         <td>          <label for="label">
  35.           <input name="use_smilies" type="checkbox" id="label" value="1" <?php checked('1', get_settings('use_smilies')); ?> />
  36.           <?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label> <br />          <label for="label2">
  37.   <input name="use_balanceTags" type="checkbox" id="label2" value="1" <?php checked('1', get_settings('use_balanceTags')); ?> />
  38.           <?php _e('WordPress should correct invalidly nested XHTML automatically') ?></label></td>
  39.       </tr>
  40.             <tr valign="top">
  41.                 <th scope="row"><?php _e('Default post category:') ?></th>
  42.                 <td><select name="default_category" id="default_category">
  43. <?php
  44. $categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");
  45. foreach ($categories as $category) :
  46. if ($category->cat_ID == get_settings('default_category')) $selected = " selected='selected'";
  47. else $selected = '';
  48.     echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
  49. endforeach;
  50. ?>
  51.                    </select></td>
  52.     </tr>
  53.     <tr>
  54.         <th scope="row"><?php _e('Newly registered members:') ?></th> 
  55.         <td> <label for="new_users_can_blog0"><input name="new_users_can_blog" id="new_users_can_blog0" type="radio" value="0" <?php checked('0', get_settings('new_users_can_blog')); ?> /> <?php _e('Cannot write articles') ?></label><br />
  56. <label for="new_users_can_blog1"><input name="new_users_can_blog" id="new_users_can_blog1" type="radio" value="1" <?php checked('1', get_settings('new_users_can_blog')); ?> /> <?php _e('May submit drafts for review') ?></label><br />
  57. <label for="new_users_can_blog2"><input name="new_users_can_blog" id="new_users_can_blog2" type="radio" value="2" <?php checked('2', get_settings('new_users_can_blog')); ?> /> <?php _e('May publish articles') ?></label><br /></td> 
  58.     </tr> 
  59. </table>
  60.  
  61. <fieldset class="options">
  62.     <legend><?php _e('Writing by e-mail') ?></legend>
  63.     <p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it’s a good idea to keep this address very secret. Here are three random strings you could use: <code>%s</code>, <code>%s</code>, <code>%s</code>.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?></p>
  64.     
  65.     <table width="100%" cellspacing="2" cellpadding="5" class="editform">
  66.         <tr valign="top">
  67.             <th scope="row"><?php _e('Mail server:') ?></th>
  68.             <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" size="40" />
  69.             <label for="mailserver_port"><?php _e('Port:') ?></label> 
  70.             <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" size="6" />
  71.             </td>
  72.         </tr>
  73.         <tr valign="top">
  74.             <th width="33%" scope="row"><?php _e('Login name:') ?></th>
  75.             <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" size="40" /></td>
  76.         </tr>
  77.         <tr valign="top">
  78.             <th scope="row"><?php _e('Password:') ?></th>
  79.             <td>
  80.                 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" size="40" />
  81.             </td>
  82.         </tr>
  83.         <tr valign="top">
  84.             <th scope="row"><?php _e('Default post by mail category:') ?></th>
  85.             <td><select name="default_email_category" id="default_email_category">
  86. <?php
  87. //Alreay have $categories from default_category
  88. foreach ($categories as $category) :
  89. if ($category->cat_ID == get_settings('default_email_category')) $selected = " selected='selected'";
  90. else $selected = '';
  91. echo "\n\t<option value='$category->cat_ID' $selected>$category->cat_name</option>";
  92. endforeach;
  93. ?>
  94.             </select></td>
  95.         </tr>
  96.     </table>
  97. </fieldset>
  98.  
  99. <fieldset class="options">
  100.     <legend><?php _e('Update Services') ?></legend>
  101.           <p><?php _e('When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="http://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URIs with line breaks.') ?></p>
  102.     
  103.     <textarea name="ping_sites" id="ping_sites" style="width: 98%;" rows="3" cols="50"><?php form_option('ping_sites'); ?></textarea>
  104. </fieldset>
  105.  
  106. <p class="submit"> 
  107.     <input type="submit" name="Submit" value="<?php _e('Update Options') ?> »" /> 
  108. </p>
  109. </form> 
  110. </div> 
  111.  
  112. <?php include('./admin-footer.php') ?>